/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.WareBrandPo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.WareBrandSqlProvider;

@Mapper
public interface IWareBrandMapper {
	/**
	 * 新增WareBrandPo对象
	 * 
	 * @param WareBrandPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=WareBrandSqlProvider.class,  method="addWareBrand") 
	public Integer addWareBrand(WareBrandPo wareBrand);

	/**
	 * 更新WareBrandPo对象
	 * 
	 * @param wareBrandPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=WareBrandSqlProvider.class,  method="updateWareBrand") 
	public Integer updateWareBrand(WareBrandPo wareBrand);
	
	/**
	 * 根据ID删除WareBrandPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=WareBrandSqlProvider.class,  method="delWareBrand") 
	public Integer delWareBrandById(Integer id);

	/**
	 * 根据IDS删除WareBrandPo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<WareBrandPo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM ware_brand WHERE id IN (#{ids})")
	public Integer delWareBrandByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找WareBrandPo对象，默认根据ID降序
	 * 
	 * @param wareBrandPo
	 * @Author 迷蝶
	 * @return List<WareBrandPo>
	 */
	@SelectProvider(type=WareBrandSqlProvider.class,  method="findWareBrands") 
	public List<WareBrandPo> findWareBrands(WareBrandPo wareBrand);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param wareBrandPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=WareBrandSqlProvider.class,  method="findWareBrandCount") 
	public Integer findWareBrandCount(WareBrandPo wareBrand);

	/**
	 * 根据ID查找WareBrandPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return WareBrandPo
	 */
	@SelectProvider(type=WareBrandSqlProvider.class,  method="findWareBrandById") 
	public WareBrandPo findWareBrandById(Integer id);
	
}